.class public final Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;
.super Landroid/support/v7/app/AppCompatActivity;
.source "AndFixActivity.kt"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nAndFixActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndFixActivity.kt\ncn/gdchent/nativehotfix/andfix/act/AndFixActivity\n*L\n1#1,68:1\n*E\n"
.end annotation

.annotation runtime Lkotlin/Metadata;
    bv = {
        0x1,
        0x0,
        0x3
    }
    d1 = {
        "\u0000.\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u00012\u00020\u0002B\u0005\u00a2\u0006\u0002\u0010\u0003J\u0008\u0010\u0008\u001a\u00020\tH\u0002J\u0008\u0010\n\u001a\u00020\tH\u0002J\u0008\u0010\u000b\u001a\u00020\u0005H\u0002J\u0012\u0010\u000c\u001a\u00020\t2\u0008\u0010\r\u001a\u0004\u0018\u00010\u000eH\u0016J\u0012\u0010\u000f\u001a\u00020\t2\u0008\u0010\u0010\u001a\u0004\u0018\u00010\u0011H\u0014R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082D\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0005X\u0082D\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0005X\u0082.\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0012"
    }
    d2 = {
        "Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity;",
        "Landroid/support/v7/app/AppCompatActivity;",
        "Landroid/view/View$OnClickListener;",
        "()V",
        "FILE_END",
        "",
        "TAG",
        "mPatchDir",
        "createBug",
        "",
        "fixBug",
        "getPatchName",
        "onClick",
        "v",
        "Landroid/view/View;",
        "onCreate",
        "savedInstanceState",
        "Landroid/os/Bundle;",
        "app_release"
    }
    k = 0x1
    mv = {
        0x1,
        0x1,
        0xf
    }
.end annotation


# instance fields
.field private final FILE_END:Ljava/lang/String;

.field private final TAG:Ljava/lang/String;

.field private _$_findViewCache:Ljava/util/HashMap;

.field private mPatchDir:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 13
    invoke-direct {p0}, Landroid/support/v7/app/AppCompatActivity;-><init>()V

    const-string v0, ".apatch"

    .line 15
    iput-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->FILE_END:Ljava/lang/String;

    const-string v0, "AndFix"

    .line 17
    iput-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->TAG:Ljava/lang/String;

    return-void
.end method

.method private final createBug()V
    .locals 4
    .annotation runtime Lcom/alipay/euler/andfix/annotation/MethodReplace;
        method = "createBug"
        clazz = "cn.gdchent.nativehotfix.andfix.act.AndFixActivity"
    .end annotation

    .line 41
    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->TAG:Ljava/lang/String;

    const-string v1, "bugBefore"

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 44
    move-object v0, p0

    check-cast v0, Landroid/content/Context;

    const-string v1, "\u6211\u662f\u4fee\u590d\u540e\u7684bug"

    move-object v2, v1

    check-cast v2, Ljava/lang/CharSequence;

    const/4 v3, 0x0

    invoke-static {v0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 45
    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->TAG:Ljava/lang/String;

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method

.method private final fixBug()V
    .locals 2

    .line 50
    sget-object v0, Lcn/gdchent/nativehotfix/andfix/manager/AndFixPatchManager;->Companion:Lcn/gdchent/nativehotfix/andfix/manager/AndFixPatchManager$Companion;

    invoke-virtual {v0}, Lcn/gdchent/nativehotfix/andfix/manager/AndFixPatchManager$Companion;->getInstance()Lcn/gdchent/nativehotfix/andfix/manager/AndFixPatchManager;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-direct {p0}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->getPatchName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcn/gdchent/nativehotfix/andfix/manager/AndFixPatchManager;->addPatch(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method private final getPatchName()Ljava/lang/String;
    .locals 2

    .line 55
    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->mPatchDir:Ljava/lang/String;

    if-nez v0, :cond_0

    const-string v1, "mPatchDir"

    invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    :cond_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "imooc"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->FILE_END:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public _$_clearFindViewByIdCache()V
    .locals 1

    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->_$_findViewCache:Ljava/util/HashMap;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    :cond_0
    return-void
.end method

.method public _$_findCachedViewById(I)Landroid/view/View;
    .locals 2

    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->_$_findViewCache:Ljava/util/HashMap;

    if-nez v0, :cond_0

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->_$_findViewCache:Ljava/util/HashMap;

    :cond_0
    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->_$_findViewCache:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/View;

    if-nez v0, :cond_1

    invoke-virtual {p0, p1}, Landroid/support/v4/app/FragmentActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iget-object v1, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->_$_findViewCache:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    invoke-virtual {v1, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_1
    return-object v0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 2
    .param p1    # Landroid/view/View;
        .annotation build Lorg/jetbrains/annotations/Nullable;
        .end annotation
    .end param

    if-eqz p1, :cond_0

    .line 58
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result p1

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    :goto_0
    const v0, 0x7f07008d

    if-nez p1, :cond_1

    goto :goto_1

    .line 59
    :cond_1
    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    if-ne v1, v0, :cond_2

    .line 60
    invoke-direct {p0}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->createBug()V

    goto :goto_2

    :cond_2
    :goto_1
    const v0, 0x7f07008e

    if-nez p1, :cond_3

    goto :goto_2

    .line 62
    :cond_3
    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    if-ne p1, v0, :cond_4

    .line 63
    invoke-direct {p0}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->fixBug()V

    :cond_4
    :goto_2
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3
    .param p1    # Landroid/os/Bundle;
        .annotation build Lorg/jetbrains/annotations/Nullable;
        .end annotation
    .end param

    .line 19
    invoke-super {p0, p1}, Landroid/support/v7/app/AppCompatActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f09001c

    .line 20
    invoke-virtual {p0, p1}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->setContentView(I)V

    const p1, 0x7f07008d

    .line 21
    invoke-virtual {p0, p1}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    const v0, 0x7f07008e

    .line 22
    invoke-virtual {p0, v0}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 23
    move-object v1, p0

    check-cast v1, Landroid/view/View$OnClickListener;

    invoke-virtual {p1, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 24
    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 25
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->getExternalCacheDir()Ljava/io/File;

    move-result-object v0

    const-string v1, "externalCacheDir"

    invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "/apatch/"

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->mPatchDir:Ljava/lang/String;

    .line 26
    sget-object p1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->mPatchDir:Ljava/lang/String;

    const-string v1, "mPatchDir"

    if-nez v0, :cond_0

    invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    :cond_0
    invoke-virtual {p1, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 28
    new-instance p1, Ljava/io/File;

    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->mPatchDir:Ljava/lang/String;

    if-nez v0, :cond_1

    invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V

    :cond_1
    invoke-direct {p1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 30
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_2

    .line 31
    invoke-virtual {p1}, Ljava/io/File;->mkdirs()Z

    .line 33
    :cond_2
    iget-object v0, p0, Lcn/gdchent/nativehotfix/andfix/act/AndFixActivity_CF;->TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "\u8def\u5f84:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/io/File;->getAbsoluteFile()Ljava/io/File;

    move-result-object p1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {v0, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method
